package com.qfedu.wfx.manager.user.service.impl;

import com.qfedu.wfx.manager.user.mapper.MerchantMapper;
import com.qfedu.wfx.manager.user.po.WxbCustomer;
import com.qfedu.wfx.manager.user.service.IMerchantService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.sql.Timestamp;
import java.util.Date;
import java.util.List;
import java.util.UUID;

@Service
public class MerchantServiceImpl implements IMerchantService{
    @Resource
    private MerchantMapper merchantMapper;


    @Override
    public List<WxbCustomer> queryMerchantInfo() {
        List<WxbCustomer> customerList = merchantMapper.queryMerchantInfo();
        return customerList;
    }

    @Override
    public void saveMerchantInfo(WxbCustomer wxbCustomer) {
        wxbCustomer.setCustomerId(UUID.randomUUID().toString());
        wxbCustomer.setCreatetime(new Timestamp(new Date().getTime()));
        merchantMapper.saveMerchantInfo(wxbCustomer);
    }
}
